#!/bin/bash

WORKSPACE=.
LUBAN_DLL=$WORKSPACE/Tools/Luban/Luban.dll
CONF_ROOT=./Template

dotnet $LUBAN_DLL \
    -t server \
    -c go-json \
    -d json \
    --conf $CONF_ROOT/luban.conf \
    -x go-json.outputCodeDir=$WORKSPACE/output/go_code \
    -x outputDataDir=$WORKSPACE/output/json \
    -x lubanGoModule=demo/luban

cp -r $WORKSPACE/output/json $WORKSPACE/output/go_code/json

rm -rf $WORKSPACE/../../go/src/cutepet_server/cfg

cp -r $WORKSPACE/output/go_code $WORKSPACE/../../go/src/cutepet_server/cfg
